package com.bl.basic.util;

import lombok.Data;

/**
 * 工具类：封装增删改的返回值
 */
@Data
public class JsonResult {

	private Boolean success = true;
	private String message = "操作成功";
	private Object resultObj;

	public Object getResultObj() {
		return resultObj;
	}

	//链式语法改造
	public JsonResult setResultObj(Object resultObj) {
		this.resultObj = resultObj;
		return this;
	}
	// 有参构造
	public JsonResult(Boolean success, String message) {
		this.success = success;
		this.message = message;
	}
	// 无参构造
	public JsonResult(){}

	//链式语法改造
	public static JsonResult me(){
		return new JsonResult();
	}
	//链式语法改造
	public JsonResult setMessage(String message) {
		this.success = false;
		this.message = message;
		return this;
	}





}
